
/*
 * rotation2.ts
 * Created on Tue Mar 23 2021 09:26:06
 *
 * Description: 
 *   No description.
 *
 * Copyright (c) 2021 tdscore
 * 
 * Copyright (c) 2021 Seymour Zhang and all contributors of this project.
 * tdscore is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *          http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */
import { asNumber } from "../../../../DSNumber";
import MixedNumber from "../../../../MixedNumber";
import sin from "../../../fn/sin"
import cos from "../../../fn/cos"
import { RawTransformation2 } from "../MartixTypes";
import { ONE_DEGREE } from "../../../";
export default function (degree: MixedNumber): RawTransformation2<number> {
    const theta = asNumber(degree) * ONE_DEGREE;
    return [
        [cos(theta), -sin(theta)],
        [sin(theta), cos(theta)]
    ]
}